<template>
  <div>
    <HomeHotUI :data="homehot1" title="男人抢手商品" />

    <HomeHotUI :data="homehot2" title="女人抢手商品" />
  </div>
</template>

<script>
import HomeHotUI from "./homehotui";

// import  { getHotData} from '../../api/home'

import api from "../../api/index";
export default {
  data() {
    return {
      homehot1: "",
      homehot2: "",
    };
  },

  components: {
    HomeHotUI,
  },
  created() {},
  async mounted() {
    //  第一种写法
    api.getHotData().then((res) => {
      console.log(res);
      this.homehot1 = res.hot1;
      this.homehot2 = res.hot2;
    });

    // 第二种写法
    // let   homehot1=    await  getHotData()
    // console.log(homehot1)
    // this.homehot1=homehot1
  },
  methods: {},
};
</script>

<style scoped   lang='less'>
</style>
